package com.ruoyi.project.shortUrl.config.enums;

import java.util.Arrays;

public enum SecondShortWay {
	NO_NEED("不需要"), SECOND_SHORT("二次缩短(缩短后再缩短)"), ONLY_THIRD("只使用第三方缩短");
	
	private String name;
	
	private SecondShortWay(String name) {
		this.setName(name);
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	public static SecondShortWay getEnum(String value) {
		return Arrays.asList(SecondShortWay.values()).stream()
        .filter(exT -> exT.toString().equals(value))
        .findFirst().orElse(SecondShortWay.NO_NEED);
	}
}
